package com.intxt.bbs.controller;

import com.intxt.bbs.util.Const;
import com.jfinal.core.Controller;
import com.jfinal.ext.render.CaptchaRender;
import com.jfinal.log.Logger;
/**
 * 主站控制类
 * @author Administrator
 *
 */
public class IndexController extends Controller{

	private Logger log = Logger.getLogger(IndexController.class);
	
	public void index(){
		log.debug("进入了index主页");
	}
	
	public void register(){
		log.debug("进入注册页面");
		render("/user/register.jsp");
	}
	
	public void login(){
		log.debug("进入登陆页面");
		render("/user/login.jsp");
	}
	public void logout(){
		log.debug("进入退出页面");
		getSession().removeAttribute("user");
		getSession().removeAttribute("systemLinks");
		getSession().removeAttribute("userLinks");
		getSession().removeAttribute("userGroup");
		redirect("/topic");
	}
	
    public void userList(){
        log.debug("进入会员列表页面");
        render("/user/userList.jsp");
    }
    
    public void img(){
    	CaptchaRender img = new CaptchaRender(Const.RANDOM_CODE_KEY);
        render(img);
    }

	public void downLoad(){
		renderFile("/client/osc-android-app-2.0.4.2.apk");
	}
}
